#include <my_header.h>
/*Usage: 03_write_ox_txt filename  */
int main(int argc, char *argv[]){
    //将int类型二进制数写入文件中
    ARGS_CHECK(argc,2);
    int fd = open(argv[1],O_RDWR | O_CREAT | O_TRUNC, 0666);
    ERROR_CHECK(fd, -1,"open");
    int num = 123456;
    ssize_t sret = write(fd, &num, sizeof(num));
    ERROR_CHECK(sret, -1, "write error");
    close(fd);
    return 0;
}


